<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\controller;

/**
 * 充值记录控制器
 */
class Recharge extends AdminBase
{
    
    /**
     * 充值记录列表
     */
    public function rechargeList()
    {
        
         $this->assign('list', $this->logicRecharge->getRechargeList());
        
         return $this->fetch('recharge_list');

    }
    
    /**
     * 充值记录添加
     */
    public function rechargeAdd()
    {
        
        IS_POST && $this->jump($this->logicRecharge->rechargeEdit($this->param));
        
        return $this->fetch('recharge_edit');
    }
    
    /**
     * 充值记录编辑
     */
    public function rechargeEdit()
    {
        
        IS_POST && $this->jump($this->logicRecharge->rechargeEdit($this->param));
        
        $info = $this->logicRecharge->getRechargeInfo(['id' => $this->param['id']]);

        // $where['id']=$info['pid'];

        // $infoa = $this->logicMember->getMemberInfo($where);
        
        // $this->assign('infoa', $infoa);

        $this->assign('info', $info);
        
        return $this->fetch('recharge_edit');
    }
    
    /**
     * 充值记录删除
     */
    public function rechargeDel($id = 0)
    {
        
        $this->jump($this->logicRecharge->rechargeDel(['id' => $id]));
    }
}
